]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st/theme-node-drawing: Fix inner shadow fast path condition
authorSebastian Keller <skeller@gnome.org>
Sat, 6 Feb 2021 23:23:04 +0000 (00:23 +0100)
committerMarge Bot <marge-bot@gnome.org>
Sun, 7 Feb 2021 01:00:05 +0000 (01:00 +0000)
We want to use the fast path of filling the entire area if either the
left and right shadows would overlap or the top and bottom shadows. The
latter check was wrong due to a typo resulting in the regular path
being used in some cases it couldn't (and shouldn't) handle.

This was causing the inset shadow used to highlight panel buttons to
not appear for buttons above a certain width.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1646>

src/st/st-theme-node-drawing.c

index 6c52da839bf76078c1ec81c02f884412d707877d..f839d990ed93cb9820485c4df641b30d1e6c9e61 100644 (file)
@@ -928,7 +928,7 @@ paint_inset_box_shadow_to_cairo_context (StThemeNode     *node,
   shrunk_extents_x2 = extents_x2 + shadow_spec->xoffset - shadow_spec->spread;
   shrunk_extents_y2 = extents_y2 + shadow_spec->yoffset - shadow_spec->spread;
 
-  if (shrunk_extents_x1 >= shrunk_extents_x2 || shrunk_extents_y1 >= shrunk_extents_x2)
+  if (shrunk_extents_x1 >= shrunk_extents_x2 || shrunk_extents_y1 >= shrunk_extents_y2)
     {
       /* Shadow occupies entire area within border */
       shadow_pattern = cairo_pattern_create_rgb (0., 0., 0.);